package pages;

import core.TestBase;
import org.openqa.selenium.By;
import org.testng.Assert;
import ui_tests.TestData;
import utils.Log4Test;

/**
 * Created by w on 09.07.14.
 */
public class ComparisonPage extends TestBase {
    protected By comparisonTitle = By.xpath(".//div[@class='title-page']/h1");
    protected By macBookME294UAPresent = By.xpath(".//div[@class='item available']//a[contains(text(),'" + TestData.MacBookME294UA + "')]");
    protected By macBookZ0PU002JEresent = By.xpath(".//div[@class='item available']//a[contains(text(),'" + TestData.MacBookZ0PU002JE + "')]");

    public void verifyComparsonTitlePresent() {
        Log4Test.info("Verify In Comparison Title Present");
        Assert.assertEquals(webDriver.findElement(comparisonTitle).getText(), "Сравнение товаров:");
    }

    public void verifyNotesPresent() {
        Log4Test.info("Verify chosen to comparison notes present");
        webDriver.findElement(macBookME294UAPresent);
        webDriver.findElement(macBookZ0PU002JEresent);
    }

}
